import React from 'react'
import './style.scss'
import logo from '../../logo.svg'
import { UserRawState } from '../../types'
export const FVHeader: React.FC = () => {
  const data =  localStorage.getItem('userInfo')
  const userInfo: UserRawState = JSON.parse(data ? data : "{}")
  return (
    <div className='fv-header'>
      <div className="left">
        <img src={logo} alt="" />
        <h3>威武霸气后端系统</h3>
      </div>
      <div className="right">
        <img src={userInfo.avator} alt="" />
        <h3 title={userInfo.sign} style={{ cursor: 'pointer' }}>{userInfo.nickname}-权限：{ userInfo.role }</h3>
      </div>
    </div>
  )
}

